<?php
 class themeModel { public function getlist() { $zym_6 = opendir(TPL_PATH); $zym_9 = array(); while ($zym_5 = readdir($zym_6)) { $zym_10 = $this->getinfo($zym_5); if ($zym_10) $zym_9[$zym_5] = $zym_10; } return $zym_9; } public function getinfo($zym_5) { $zym_10 = array(); $zym_8 = TPL_PATH . '/' . $zym_5; if ($zym_5 != '.' && $zym_5 != '..' && is_dir($zym_8)) { $zym_7 = $zym_8 . '/config.ini'; if (is_file($zym_7)) { $zym_10 = parse_ini_file($zym_7, true); $zym_10['demo'] = is_file($zym_8 . '/demo.jpg') ? str_replace(PT_ROOT, '', $zym_8 . '/demo.jpg') : PT_DIR . '/public/image/nopic.jpg'; $zym_10['type']=isset($zym_10['type'])?$zym_10['type']:''; switch ($zym_10['type']) { case 'wap': $zym_10['typename'] = '手机模版'; break; case 'pc': $zym_10['typename'] = 'PC模版'; break; case 'all': $zym_10['typename'] = '响应式'; break; default: $zym_10['typename'] = '未设置'; } } } return $zym_10; } }
?>